//
//  BySingalImageNewsCell.m
//  jmsfhz_ios
//
//  Created by pro on 16/7/30.
//  Copyright © 2016年 pro. All rights reserved.
//

#import "BySingalImageNewsCell.h"

@implementation BySingalImageNewsCell

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
    
        self.backgroundColor = [UIColor whiteColor];
    }
    return self;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    self.imageView.frame = CGRectMake(0, 0, self.width, self.width);
    self.contentLabel.frame = CGRectMake(0, self.imageView.bottom, self.width, self.height - self.width);
}

/** getter */
- (UIImageView *)imageView {
    if (!_imageView) {
        _imageView = [[UIImageView alloc] init];
        _imageView.image = [UIImage imageNamed:@"defaultImage"];
        [self.contentView addSubview:_imageView];
    }
    return _imageView;
}
- (UILabel *)contentLabel {
    if (!_contentLabel) {
        _contentLabel = [[UILabel alloc] init];
        _contentLabel.textColor = [UIColor blackColor];
        _contentLabel.font = FONT(14);
        _contentLabel.textAlignment = NSTextAlignmentCenter;
        [self.contentView addSubview:_contentLabel];
    }
    return _contentLabel;
}
@end
